package com.csthink.common.infrastructure.constant;

/**
 * @author <a href="mailto:security.2009@live.cn">Mars</a>
 * @since 2023-09-12
 */
public class JwtConstants {

    public static final String AUTHORIZATION_BEARER = "Bearer ";
    public static final String AUTHORIZATION = "Authorization";

    public static final String ISSUE = "iss";
    public static final String AUDIENCE = "aud";
    public static final String EXPIRE = "exp";

    public static final String CST_TRACKING_ID = "x-cst-trackingid";
    public static final String JWT_CLAIM_USER_ID = "uid";
    public static final String JWT_CLAIM_USERNAME = "uname";
    public static final String JWT_CLAIM_ACCOUNT_ID = "aid";
    public static final String JWT_CLAIM_EMAIL = "email";

    public static final String JWT_CLAIM_SCOPES = "scp";
    public static final String JWT_CLAIM_DISPLAY_NAME = "dname";
    public static final String JWT_CLAIM_DATE_FORMAT = "dft";
    public static final String JWT_CLAIM_HOUR_SYSTEM = "hsm";

    public static final String JWT_CLAIM_LOGIN_EMAIL = "lem";
    public static final String JWT_CLAIM_OPERATOR_NAME = "oname";
    public static final String JWT_CLAIM_SOURCE_FROM = "sfm";

    public static final String JWT_CLAIM_WEB_PERMISSION = "cwp";

    public static final String NAME_COMMON_REGEX="^[a-zA-Z][0-9a-zA-Z\\-/_. ]*$";
    public static final String NAME_COMMON_REGEX_PROMPT="Name must be start with letter and contain only the following: A-Z, a-z, 0-9, _.-/ ";

}
